package View.SetupScreens;


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

import Model.Game;

import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

	/**
	 * 	Constructs the map select screen
	 *  This screen selects whether it will use the standard game map or a randomly generated map
	 *  Creates a title label and two buttons for the selection of random map or standard map
	 * @author Matt Miller
	 *
	 */


public class MapSelect extends JPanel {
	
	private static final long serialVersionUID = 1L;
	public final Game game;
	public JLabel title;
	public JButton random;
	public JButton normal;
	
	/**
	 * Initializes, constructs, and sets parameters for all
	 * swing components. Includes actionlistener to set map
	 * parameter for game.
	 * @param game - an instance of the main Game. The parameter is "final" so that the inner actionlistener class can access it.
	 */
	public MapSelect(final Game game) {
		this.game = game;
		
		setBackground(Color.BLACK);
		setLayout(null);
		setPreferredSize(new Dimension(1200, 800));
		
		title = new JLabel("CHOOSE YOUR MAP");
		title.setFont(new Font("Helvetica", Font.BOLD, 65));
		title.setForeground(new Color(204, 153, 0));
		title.setSize(670, 100);
		title.setLocation(304, 73);
		
		random = new JButton("RANDOM MAP");

		
		random.setFont(new Font("Helvetica", Font.BOLD, 36));
		random.setForeground(new Color(204, 153, 0));
		random.setSize(592, 100);
		random.setLocation(300, 300);
		
		normal = new JButton("NORMAL MAP");

		
		normal.setFont(new Font("Helvetica", Font.BOLD, 36));
		normal.setForeground(new Color(204, 153, 0));
		normal.setSize(592, 100);
		normal.setLocation(300, 450);
	
		add(normal);
		add(random);
		add(title);
	}

}
